const organization = { name: "Acme Gooseberries", country: "GB" };
/************************************************************ */
// 1. 先封装数据结构
class Organization {
    constructor(data) {
        this._name = data.name;
        this._country = data.country;
    }
    get title() {
        return this._name;
    }
    set title(aString) {
        this._name = aString;
    }
    get country() {
        return this._country;
    }
    set country(aCountryCode) {
        this._country = aCountryCode;
    }
}
const organization2 = new Organization({ name: "Acme Gooseberries", country: "GB" });
/************************************************************ */

// 2. 修改 name 为 title
class Organization {
    constructor(data) {
        this._title =data.title;
        this._country = data.country;
    }
    get name() {
        return this._title;
    }
    set name(aString) {
        this._title = aString;
    }
    get country() {
        return this._country;
    }
    set country(aCountryCode) {
        this._country = aCountryCode;
    }
}
const organization3 = new Organization({ title: "Acme Gooseberries", country: "GB" });